package com.sayice.robotconflict.util

import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.drawWithContent
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Color
import com.sayice.robotconflict.ui.screen.cpx

/**
 * 标记为未读
 *
 * @param show 是否显示
 * @param color 颜色
 */
fun Modifier.unread(show: Boolean = true, color: Color = Color.Red): Modifier =
    this.drawWithContent {
        drawContent()
        if (show) {
            drawCircle(color = color, radius = 10.cpx, center = Offset(size.width, 0.cpx))
        }
    }
